package customerEnter.Frame.WebScoketChat;

import java.util.HashMap;
import java.util.Map;

/**
 * 鏈接上服務的人
 * 
 * 类名称：ChatServiceInformation 类描述： 创建人：dy 创建时间：2016-4-16 下午1:12:53
 * 
 */
public class ChatServiceInformation {

	private ChatServiceInformation() {
	}

	public static void setChatMap(String UUID, ChatUser chatChatUser) {
		if (ChatMaps.chat == null) {
			ChatMaps.chat = new HashMap<String, ChatUser>();
		}
		ChatMaps.chat.put(UUID, chatChatUser);
	}

	public static Map<String, ChatUser> getChatMap() {
		return ChatMaps.chat;
	}

	public static void setUUID(String UUID) {
		if (ChatMaps.chat == null) {
			ChatMaps.chat = new HashMap<String, ChatUser>();
		}
		ChatMaps.chat.put(UUID, null);
	}

	public static void setChatUser(String UUID, ChatUser chatUser) {
		ChatMaps.chat.get(UUID).setSession(chatUser.getSession());
		ChatMaps.chat.get(UUID).setUserId(chatUser.getUserId());
		ChatMaps.chat.get(UUID).setUserName(chatUser.getUserName());
	}
}
